drm/vc4: Add runtime PM support to the HDMI encoder driver
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 11 Apr 2017 16:39:25 +0000 (18:39 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 15 Feb 2018 17:38:19 +0000 (17:38 +0000)
commit35e7aa63abb1643ad939d1ef001f39413d7c3a6a
tree083efec719ff5fa9adf5920e86609c4e0c36de83
parentbd474753999739e7b436231bea8a86cad7482813
drm/vc4: Add runtime PM support to the HDMI encoder driver

The HDMI driver is currently enabling all clocks at probe time and
keeps the power-domain connected to the HDMI encoder enabled.

Move all activation code to vc4_hdmi_encoder_enable() and make sure
the clks and power domain are released when the HDMI encoder is not used
by adding deactivation steps in vc4_hdmi_encoder_disable().

Note that the sequencing imposed by the IP requires that we move
vc4_hdmi_encoder_mode_set() code into vc4_hdmi_encoder_enable().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4f6e3d66ac522dec9733d433ad00e8e77747c372)
drivers/gpu/drm/vc4/vc4_hdmi.c